from pml import PML


# The object is file namespace.
#   The namespace stores all keywords.
class Keywords:
	BEGIN = PML.object.ChangeObject.PMLString_FromStr('begin')
	END = PML.object.ChangeObject.PMLString_FromStr('end')
	VAR = PML.object.ChangeObject.PMLString_FromStr('var')
	LET = PML.object.ChangeObject.PMLString_FromStr('let')
	CONST = PML.object.ChangeObject.PMLString_FromStr('const')
	IS = PML.object.ChangeObject.PMLString_FromStr('is')
	FOR = PML.object.ChangeObject.PMLString_FromStr('for')
	FROM = PML.object.ChangeObject.PMLString_FromStr('from')
	TO = PML.object.ChangeObject.PMLString_FromStr('to')
	IN = PML.object.ChangeObject.PMLString_FromStr('in')
	IF = PML.object.ChangeObject.PMLString_FromStr('if')
	ELSE = PML.object.ChangeObject.PMLString_FromStr('else')
	FUNCTION = PML.object.ChangeObject.PMLString_FromStr('function')
	RETURN = PML.object.ChangeObject.PMLString_FromStr('return')
	IMPORT = PML.object.ChangeObject.PMLString_FromStr('import')
	INCLUDE = PML.object.ChangeObject.PMLString_FromStr('include')


# These constants are types of Token.
TT_EOF = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_EOF')
TT_SIGN = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_SIGN')
TT_NAME = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_NAME')
TT_KEYWORD = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_KEYWORD')
TT_OPERATION = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_OPERATION')
TT_INT = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_INT')
TT_FLOAT = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_FLOAT')
TT_CHAR = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_CHAR')
TT_STRING = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_STRING')
TT_BOOLEAN = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_BOOLEAN')
TT_NULL = PML.object.ChangeObject.PMLObject_FromPythonObject('TT_NULL')

# These constants are values of Token.
TV_EOF = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_EOF')
TV_ADD = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_ADD')
TV_SUB = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_SUB')
TV_MUL = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_MUL')
TV_DIV = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_DIV')
TV_MOD = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_MOD')
TV_EQ = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_EQ')
TV_SET_VALUE = PML.object.ChangeObject.PMLObject_FromPythonObject(Keywords.IS.obj.value)
TV_COMMA = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_COMMA')
TV_POINT = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_POINT')
TV_LP1 = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_LP1')
TV_RP1 = PML.object.ChangeObject.PMLObject_FromPythonObject('TV_RP1')

# These constants can help lexer to create token stream.
TH_NUMBERS = PML.object.ChangeObject.PMLObject_FromPythonObject('1234567890')
TH_LETTERS = PML.object.ChangeObject.PMLObject_FromPythonObject('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
TH_KEYWORDS = PML.object.ChangeObject.PMLList_FromList([Keywords.BEGIN, Keywords.END, Keywords.VAR, Keywords.LET, Keywords.CONST, Keywords.IS, Keywords.FOR, Keywords.FROM, Keywords.TO, Keywords.IN, Keywords.IF, Keywords.ELSE, Keywords.FUNCTION, Keywords.RETURN, Keywords.IMPORT, Keywords.INCLUDE])
TH_NUMBERTYPES = PML.object.ChangeObject.PMLList_FromList([TT_INT, TT_FLOAT, TT_CHAR, TT_STRING, TT_BOOLEAN, TT_NULL])
TH_LEFT_UNARY_OPERATORS = PML.object.ChangeObject.PMLList_FromList([TV_ADD, TV_SUB])
TH_RIGHT_UNARY_OPERATORS = PML.object.ChangeObject.PMLList_FromList([])
TH_BINARY_OPERATOR = PML.object.ChangeObject.PMLList_FromList([TV_ADD, TV_SUB, TV_MUL, TV_DIV, TV_MOD, TV_EQ, TV_POINT])
